<template>
  <div class="order">
    <NavBar :title="hotel.homestaysName" left-arrow @click-left="onClickLeft"></NavBar>

    <cell :label="hotel.intro" :title=" hotel.roomType" is-link />
    <hr>
    <cell-group> 
      <cell title="入住信息" />
      <cell title="入离日期" value="内容" is-link />
      <cell title="入住人数" is-link />
      <cell title="住客信息" value="内容" is-link />
    </cell-group>
  </div>
</template>
<script setup>
import { ref } from "vue";
import { Cell, CellGroup, NavBar } from "vant";
import { useRoute, useRouter } from "vue-router";
import { orderAPI } from "../services/order";
import { loadDetailAPI } from "../services/hotel";

const route = useRoute();
const router = useRouter();
console.log(route.query.id);

const hotel = ref({});
const loadData = async () => {
  const data = await loadDetailAPI(route.query.id);
  console.log(data);
  hotel.value = data.data;
};
loadData();
const onClickLeft = () => {
  router.go(-1);
};
</script>
